//
//  CLTextCell.m
//  chanlin
//
//  Created by Ryan on 14-11-18.
//  Copyright (c) 2014年 chanlin. All rights reserved.
//

#import "CLTextCell.h"

@implementation CLTextCell

- (void)initUI{
    self.text=[[UITextView alloc] init];
    self.text.contentInset=UIEdgeInsetsMake(-2.f, -5.f, 0, 0);
    self.text.scrollEnabled=NO;
    self.text.editable=NO;
    self.text.backgroundColor=self.backgroundColor;
    // self.text.autoresizingMask=UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    [self.contentView addSubview:self.text];
}

- (void)loadElement:(INHtmlElement *)element{
    self.text.frame=CGRectMake(I_DOC_TEXT_MARGIN_SPACE, 0, I_DOC_CONTENT_WIDTH, element.cellHeight);
    self.text.attributedText=element.textAttributedString;
}

@end
